import React,{useState} from 'react'
import XzButton from './components/XzButton'

export default function App() {
  let [showChild,setShowChild]=useState(false)
  return (
    <div>
      <h3>这里是跟组件</h3>
      <button onClick={()=>{setShowChild(!showChild)}}>挂载/卸载子组件</button>
      <hr/>
      {
        showChild && (<XzButton></XzButton>)
      }
    </div>
  )
}
